package com.mirror.repository;

import com.mirror.entity.oldman.Employees;
import com.mirror.entity.oldman.Nurse;
import com.mirror.util.CommonUtil;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface NurseRepository extends JpaRepository<Nurse, String>, JpaSpecificationExecutor<Nurse> {
    List<Nurse> findAllByIsMonitor(boolean is);

    Nurse findAllByNum(String num);

    Nurse findAllByPhone(String phone);

    List<Nurse> findAllByNameLikeOrNumLike(String name,String num);

    Page<Nurse> findAllByNameLike(Pageable pageable, String name);

}
